import request from '@/utils/request'

// 查询用于存储资产领用信息的列表
export function listUsage(query) {
  return request({
    url: '/system/usage/list',
    method: 'get',
    params: query
  })
}
// 触发计算实际出库数
export function listNum() {
  return request({
    url: '/system/usage/listNum',
    method: 'get'
  })
}
// 查询出库明细表（已发卡，已入库）的资产
export function listCk(query) {
  return request({
    url: '/system/product/list',
    method: 'get',
    params: query
  })
}
// 查询用于存储资产领用信息的详细
export function getUsage(id) {
  return request({
    url: '/system/usage/' + id,
    method: 'get'
  })
}

// 新增用于存储资产领用信息的
export function addUsage(data,infoList) {
	data.infoList = infoList;
  return request({
    url: '/system/usage',
    method: 'post',
    data: data
  })
}

// 修改用于存储资产领用信息的
export function updateUsage(data,infoList) {
	data.infoList = infoList;
  return request({
    url: '/system/usage',
    method: 'put',
    data: data
  })
}

// 删除用于存储资产领用信息的
export function delUsage(id) {
  return request({
    url: '/system/usage/' + id,
    method: 'delete'
  })
}
